import request from '@/utils/request'

// 查询企业工单人员信息列表
export function listWorkOrderPerson(params) {
  return request({
    url: '/enterprise/workOrder/person/list',
    method: 'get',
    params: params
  })
}

// 新增企业工单人员信息
export function addWorkOrderPerson(data) {
  return request({
    url: '/enterprise/workOrder/person',
    method: 'post',
    data: data
  })
}

// 获取企业工单人员信息
export function getWorkOrderPerson(params) {
  return request({
    url: '/enterprise/user/userBusiness/userList',
    method: 'get',
    params: params
  })
}

// 删除企业工单人员信息（路径传工单人员id）
export function deleteWorkOrderPerson(id) {
  return request({
    url: '/enterprise/workOrder/person/' + id,
    method: 'delete'
  })
}

// 查询该企业下全部工单人员信息
export function listAllWorkOrderPerson(params) {
  return request({
    url: '/enterprise/workOrder/person/info',
    method: 'get',
    params: params
  })
}

// 查询工单人员待完成工单信息(路径上传工单人员信息id)
export function listWorkOrder(id) {
  return request({
    url: '/enterprise/workOrder/workOrder/info/' + id,
    method: 'get'
  })
}
